﻿using AutoTest.Framework.Pager;

namespace AutoTest.Business.Dto.Common.Setting
{
    /// <summary>
    /// 配置搜索DTO
    /// </summary>
    public class SettingSearchDto
    {
        /// <summary>
        /// 关键词
        /// </summary>
        public string Keyword { get; set; } = string.Empty;

        /// <summary>
        /// 环境
        /// </summary>
        public string Env { get; set; } = string.Empty;
    }
    /// <summary>
    /// 分页搜索
    /// </summary>
    public class SettingPageSearchDto : SettingSearchDto, IPagedSearchDto
    {
        private int _pageIndex;
        private int _pageSize;
        /// <summary>
        /// 
        /// </summary>
        public int PageIndex { get => _pageIndex; set => _ = value > 0 ? _pageIndex = value : _pageIndex = 0; }
        /// <summary>
        /// 
        /// </summary>
        public int PageSize { get => _pageSize; set => _ = value > 0 ? _pageSize = value : _pageSize = 20; }
    }
}
